import request from '@/utils/request'

// 查询岗位列表
export function listFloor(query) {
  return request({
    url: '/device/floor',
    method: 'get',
    params: query
  })
}

export function listAllFloor() {
  return request({
    url: '/device/floor/listAll',
    method: 'get'
  })
}

// 查询岗位详细
export function getFloor(floorId) {
  return request({
    url: '/device/floor/' + floorId,
    method: 'get'
  })
}

// 新增岗位
export function addFloor(data) {
  return request({
    url: '/device/floor',
    method: 'post',
    data: data
  })
}

// 修改岗位
export function updateFloor(data) {
  return request({
    url: '/device/floor',
    method: 'put',
    data: data
  })
}

// 删除岗位
export function delFloor(floorId) {
  return request({
    url: '/device/floor/' + floorId,
    method: 'delete'
  })
}
